package com.ww.springboot.boot.baseTest.design.责任链;

import com.ww.springboot.boot.baseTest.design.责任链.son.FirstHandler;
import com.ww.springboot.boot.baseTest.design.责任链.son.SecondHandler;
import com.ww.springboot.boot.baseTest.design.责任链.son.ThirdHandler;

/**
 * todo 责任链
 * 1.含义
 *
 * 2.实现
 *   创建一个父类  包含一个handler
 *   创建责任链节点类 包含各自实现及绑定下一节点
 *   链条生成器
 *
 * @author wanwei
 * @since 2021-05-25 22:32
 */
public class ZeRenLianMain {

    public static void main(String[] args) {
        ThirdHandler thirdHandler = new ThirdHandler();
        SecondHandler secondHandler = new SecondHandler(thirdHandler);
        FirstHandler firstHandler = new FirstHandler(secondHandler);

        firstHandler.handler();


    }
}
